package ar.com.photo_admin.selenium

import grails.plugins.selenium.*
import org.junit.*
import static org.junit.Assert.*
import static org.hamcrest.Matchers.*

@Mixin(SeleniumAware)
class LoginTest {

	@Before void setUp() {
	}

	@Test void simpleSiteLogIn() {
		selenium.open("/PhotoAdminGrailsApp/");
		selenium.click("id=enterSiteButton");
		selenium.type("inputId", "nicolasgnr");
		selenium.type("passwordField", "12345678");
		selenium.click("loginButton");
		selenium.waitForPageToLoad("30000");
		assertEquals("nicolasgnr", selenium.getText("dropdownLoggedInUser"));
	}

	@After void tearDown() {
	}
}
